<?php
/**
 * Created by PhpStorm.
 * User: Cloud
 * Date: 2018/3/29
 * Time: 10:55
 */
?>
<!DOCTYPE html>
<html>
<head>
    <!--[if lt IE 7]>
    <div class="ie6_error">还在用<strong>漏洞百出的IE6浏览器</strong>么？为了您的网络安全，请升级浏览器 <a target="_blank"
                                                                               href="http://browsehappy.com">立即升级</a>
    </div>
    <![endif]-->

    <meta charset="utf-8">
    <title>个人中心（user-manager）-文具1号</title>
    <meta name="description"
          content="文具1号作为上海办公用品供货商公司,专为世界500强企业及SOHO办公族提供网上商城一站式办公耗材批发及采购服务,一站式选购办公日用文具用品,厂家直销,好货又便宜【阳光采购就上文具1号 阳光价格 老板放心 品质保障 员工省力】"/>
    <meta name="keywords" content="办公用品,办公文具,办公文具网站,文具网站,办公用品网,文具采购网,金万年"/>
    <meta name="copyright" content="上海易推信息科技有限公司"/>
    <base href="<?php echo base_url(); ?>"/>
    <meta name="renderer" content="webkit">
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="stylesheet" href="public/js/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="public/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/cost-center.css"/>

    <!--[if lte IE 9]>
    <script type="text/javascript" src="public/js/html5shiv-printshiv-3.js"></script>
    <![endif]-->
</head>
<body>
<div class="bg">
    <!--common - head -->
    <?php $this->load->view('common/header.php'); ?>
    <!--common - head end-->

    <div class="container mt30">
        <div class="my-center-container">
            <?php $this->load->view('member/personal_left.php'); ?>
            <div class="my-center-right">
                <p class="my-center-right-tit">发票抬头</p>
                <div class="my-center-right-cont">
                    <div class="my-center-right-form-box" style="width:540px;">
                        <form class="layui-form  my-center-right-form workbench-detail-form" action="">
                            <input type="hidden" value="" id="addr_id" name="id">
                            <div class="radio-box tal">
                                <input type="radio" id="zzs_id" name="invoice_type" value="2" title="增值税专用发票信息"
                                       checked="">
                                <input type="radio" id="zzspt_id" name="invoice_type" value="4" title="增值税普通发票信息">
                            </div>
                            <div class="pop-add-address-box" id="dwmc_div">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">单 位 名 称 <em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="text" id="invoice_company_name" name="invoice_company_name"
                                               lay-verify="title" autocomplete="off" style="float:left;" required
                                               placeholder="请输入单位名称" class="layui-input" value="">
                                    </div>
                                </div><!--账号-->

                                <div class="layui-form-item" id="nsrsbm_div">
                                    <label class="layui-form-label">纳税人识别码<em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="text" id="invoice_code" name="invoice_code" required
                                               placeholder="请输入纳税人识别码" value="" style="width:434px" autocomplete="off"
                                               class=" layui-input">
                                    </div>
                                </div><!--纳税人识别码-->
                                <div class="layui-form-item" id="zcdz_div">
                                    <label class="layui-form-label">注 册 地 址<em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="tel" id="invoice_address" name="invoice_address" lay-verify="name"
                                               autocomplete="off" placeholder="请输入注册地址" value="" style="width:434px"
                                               class="layui-input">
                                    </div>
                                </div><!--地  址-->

                                <div class="layui-form-item" id="zcdh_div">
                                    <label class="layui-form-label">注 册 电 话<em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="tel" id="invoice_tel" name="invoice_tel" lay-verify="phone"
                                               autocomplete="off" placeholder="请输入联系方式" value="" class="layui-input">
                                    </div>
                                </div><!--联系方式-->
                                <div class="layui-form-item" id="khyh_div">
                                    <label class="layui-form-label">开 户 银 行<em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="text" id="invoice_bank" name="invoice_bank" lay-verify="phone"
                                               autocomplete="off" value="" placeholder="请输入开户银行" class="layui-input">
                                    </div>
                                </div><!--开  户  银  行-->
                                <div class="layui-form-item" id="yhzh_div">
                                    <label class="layui-form-label">银 行 账 户<em class="color-red">*</em></label>
                                    <div class="layui-input-block">
                                        <input type="tel" id="invoice_account" name="invoice_account" lay-verify="name"
                                               autocomplete="off" placeholder="请输入银行账户" value="" style="width:434px"
                                               class="layui-input">
                                    </div>
                                </div><!--银  行  账  户-->
                            </div>
                            <div class="checkbox-box">
                                <input type="checkbox" id="is_default" name="like1[default]" lay-skin="primary"
                                       title="设置为默认发票抬头" checked="" value="">
                            </div>
                            <div class="btn-box1">
                                <a href="javascript:;" id="invoice" class="btn-cancel">保存</a>
                            </div>
                        </form>
                    </div>

                    <p class="my-center-right-tit02">
                        已保存发票抬头
                    </p>
                    <?php if (isset($data)): ?>
                        <?php foreach ($data as $info): ?>
                            <div class="my-center-right-invoice-item">
                                <p class="name"><?php echo $info['invoice_company_name'] ?></p>
                                <input type="hidden" class="invoice_type" value="<?php echo $info['invoice_type'] ?>">
                                <input type="hidden" class="invoice_code" value="<?php echo $info['invoice_code'] ?>">
                                <input type="hidden" class="invoice_address"
                                       value="<?php echo $info['invoice_address'] ?>">
                                <input type="hidden" class="invoice_tel" value="<?php echo $info['invoice_tel'] ?>">
                                <input type="hidden" class="invoice_bank" value="<?php echo $info['invoice_bank'] ?>">
                                <input type="hidden" class="invoice_account"
                                       value="<?php echo $info['invoice_account'] ?>">
                                <div class="btn-active-box">
                                    <a href="javascript:;" onclick="editAddress($(this))"
                                       id="<?php echo $info['id'] ?>">修改</a>
                                    <!--                            <a href="javascript:;" onclick="delAddress($(this))" class=" deletects">删除</a>-->
                                    <a href="javascript:;" id="<?php echo $info['id'] ?>" class="deletects">删除</a>
                                </div>
                                <?php if ($info['is_default'] == 0): ?>
                                    <a href="javascript:;" id="<?php echo $info['id'] ?>"
                                       class="set-default default_address" gdata-value="0">设为默认抬头</a>
                                <?php else: ?>
                                    <a style="color: red;padding-left: 80px" href="javascript:;" class="default_address"
                                       gdata-value="1">默认抬头</a>
                                <?php endif; ?>
                            </div>
                        <?php endforeach; ?>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>

    <?php $this->load->view('common/bottom.php'); ?>

    <script type="text/javascript" src="public/js/jquery.min.js"></script>
    <script src="public/js/layui/layui.js"></script>
    <script type="text/javascript" src="public/js/index.js"></script>
    <script type="text/javascript" src="public/js/owl.carousel.min.js"></script>

    <script>
        layui.use(['element', 'form', 'layedit', 'laydate', 'upload'], function () {
            var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
            var form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit;
            var $ = layui.jquery
                , upload = layui.upload;

            //监听导航点击
            element.on('nav(demo)', function (elem) {
                //console.log(elem)
//      layer.msg(elem.text());
            });
            //普通图片上传
            var uploadInst = upload.render({
                elem: '#test1'
                , url: '/upload/'
                , before: function (obj) {
                    //预读本地文件示例，不支持ie8
                    obj.preview(function (index, file, result) {
                        $('#demo1').attr('src', result); //图片链接（base64）
                    });
                }
                , done: function (res) {
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                }
                , error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
            var uploadInst2 = upload.render({
                elem: '#test2'
                , url: '/upload/'
                , before: function (obj) {
                    //预读本地文件示例，不支持ie8
                    obj.preview(function (index, file, result) {
                        $('#demo2').attr('src', result); //图片链接（base64）
                    });
                }
                , done: function (res) {
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                }
                , error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });
            var uploadInst3 = upload.render({
                elem: '#test3'
                , url: '/upload/'
                , before: function (obj) {
                    //预读本地文件示例，不支持ie8
                    obj.preview(function (index, file, result) {
                        $('#demo3').attr('src', result); //图片链接（base64）
                    });
                }
                , done: function (res) {
                    //如果上传失败
                    if (res.code > 0) {
                        return layer.msg('上传失败');
                    }
                    //上传成功
                }
                , error: function () {
                    //演示失败状态，并实现重传
                    var demoText = $('#demoText');
                    demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                    demoText.find('.demo-reload').on('click', function () {
                        uploadInst.upload();
                    });
                }
            });

            //监听提交
            form.on('submit(demo1)', function (data) {
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                return false;
            });


            $('#zzs_id').next().click(function () {
                $("#dwmc_div").show();
                $("#dwmc_div #invoice_company_name").val("");
                $("#nsrsbm_div").show();
                $("#nsrsbm_div #invoice_code").val("");
                $("#zcdz_div").show();
                $("#zcdh_div").show();
                $("#khyh_div").show();
                $("#yhzh_div").show();
            });

            $('#zzspt_id').next().click(function () {
                $("#dwmc_div").show();
                $("#dwmc_div #invoice_company_name").val("");
                $("#nsrsbm_div").show();
                $("#nsrsbm_div #invoice_code").val("");
                $("#zcdz_div").hide();
                $("#zcdz_div #invoice_address").val("");
                $("#zcdh_div").hide();
                $("#zcdh_div #invoice_tel").val("");
                $("#khyh_div").hide();
                $("#khyh_div #invoice_bank").val("");
                $("#yhzh_div").hide();
                $("#yhzh_div #invoice_account").val("");
            });

        });
    </script>
    <script type="text/javascript">
        $("#invoice").click(function (e) {
            if($('#zzs_id').is(':checked')){
                if (!$('#invoice_company_name').val()) {
                    layer.msg('请输入单位名称');
                    e.stopPropagation();
                    return false;
                }else {
                    // var reg = '/^[A-Za-z0-9\_\-\()\（）\u4e00-\u9fa5]+$/';//中文，英文和数字
                    var name = $('#invoice_company_name').val();
                    var company_name=$.trim(name).length;
                    if (!/^[A-Za-z0-9_\-\(\)（）\u4e00-\u9fa5]+$/.test(name)) {
                        layer.msg('单位名称请输入中英文，数字,"-","_","（）","()"的组合');
                        e.stopPropagation();
                        return false;
                    }
                    if (company_name < 3 || company_name > 60 ) {
                        layer.msg('单位名称请输入3-60个字符');
                        e.stopPropagation();
                        return false;
                    }
                }

                if (!$('#invoice_code').val()) {
                    layer.msg('请输入纳税人识别码');
                    e.stopPropagation();
                    return false;
                }else {
                    // var reg = '/^[a-zA-Z0-9]+$/';  //数字和字母
                    var invoice_code = $('#invoice_code').val();
                    if (!/^[a-zA-Z0-9]+$/.test(invoice_code)) {
                        layer.msg('识别码格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                    var code=$.trim(invoice_code).length;
                    if ( code !== 15 && code !== 18 && code !==20) {
                        layer.msg('识别码格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                }

                if (!$('#invoice_address').val()) {
                    layer.msg('请输入详细注册地址');
                    e.stopPropagation();
                    return false;
                }else{
                    var address= $('#invoice_address').val();
                    if(!/^(?=.*?[\u4E00-\u9FA5])/.test(address)){
                        layer.msg('注册地址不能全为数字或字母');
                        e.stopPropagation();
                        return false;
                    }
                    if ($.trim(address).length < 6 || $.trim(address).length > 60) {
                        layer.msg('注册地址必须为6-60个字符');
                        e.stopPropagation();
                        return false;
                    }
                }

                if (!$('#invoice_tel').val()) {
                    layer.msg('请输入注册电话');
                    e.stopPropagation();
                    return false;
                }else{
                    var invoice_tel=$('#invoice_tel').val();
                    if(!/^0\d{2,3}-?\d{7,8}(-\d{1,8})?$/.test(invoice_tel) && !/^1[345789]{1}\d{9}$/.test(invoice_tel)){
                        layer.msg('注册电话格式输入错误，请核对！');
                        return false;
                    }
                    if ($.trim(invoice_tel).length <11 || $.trim(invoice_tel).length > 20) {
                        layer.msg('注册电话格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }

                }
                if (!$('#invoice_bank').val()) {
                    layer.msg('请输入银行名称');
                    e.stopPropagation();
                    return false;
                }else{
                    var bank = $('#invoice_bank').val();
                    if (!/^[A-Za-z\(\)（）\u4e00-\u9fa5]+$/.test(bank)) {
                        layer.msg('银行名称格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                    if ($.trim(bank).length < 6 || $.trim(bank).length > 30) {
                        layer.msg('银行名称必须为6-30个字符');
                        e.stopPropagation();
                        return false;
                    }
                }

                if (!$('#invoice_account').val()) {
                    layer.msg('请输入银行账户');
                    e.stopPropagation();
                    return false;
                }else{
                    var account=$('#invoice_account').val();
                    // var reg=/^[1-9][0-9]*$/;
                    //tmptxt.replace(/\D|^0/g,'')
                    if(!/^[1-9][0-9]*$/.test(account)){
                        layer.msg('银行账户格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                    if ($.trim(account).length < 8 || $.trim(account).length > 30) {
                        layer.msg('银行账户必须为8-30个字符');
                        e.stopPropagation();
                        return false;
                    }
                }
            }
            if($('#zzspt_id').is(':checked')){
                if (!$('#invoice_company_name').val()) {
                    layer.msg('请输入单位名称');
                    e.stopPropagation();
                    return false;
                }else {
                    // var reg = '/^[A-Za-z0-9\_\-\()\（）\u4e00-\u9fa5]+$/';//中文，英文和数字
                    var name = $('#invoice_company_name').val();
                    var company_name=$.trim(name).length;
                    if (!/^[A-Za-z0-9_\-\(\)（）\u4e00-\u9fa5]+$/.test(name)) {
                        layer.msg('请输入中英文，数字,"-","_","（）","()"的组合');
                        e.stopPropagation();
                        return false;
                    }
                    if (company_name < 3 || company_name > 60 ) {
                        layer.msg('请输入3-60个字符');
                        e.stopPropagation();
                        return false;
                    }
                }

                if (!$('#invoice_code').val()) {
                    layer.msg('请输入纳税人识别码');
                    e.stopPropagation();
                    return false;
                }else {
                    var invoice_code = $('#invoice_code').val();
                    if (!/^[a-zA-Z0-9]+$/.test(invoice_code)) {
                        layer.msg('识别码格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                    var code=$.trim(invoice_code).length;
                    if ( code !== 15 && code !== 18 && code !==20) {
                        layer.msg('识别码格式输入错误，请核对！');
                        e.stopPropagation();
                        return false;
                    }
                }
            }
            var zzs_id = $("#zzs_id").is(':checked');
            if (zzs_id == true) {
                var invoice_type = $("#zzs_id").val();
            }
            var zzspt_id = $("#zzspt_id").is(':checked');
            if (zzspt_id == true) {
                var invoice_type = $("#zzspt_id").val();
            }
            var id = $("#addr_id").val();
            // console.log(id);
            var invoice_company_name = $("#invoice_company_name").val();
            var invoice_code = $("#invoice_code").val();
            var invoice_address = $("#invoice_address").val();
            var invoice_tel = $("#invoice_tel").val();
            var invoice_bank = $("#invoice_bank").val();
            var invoice_account = $("#invoice_account").val();
            var is_default = $("input[type='checkbox']").is(':checked');
            if (is_default == true) {
                is_default = 1
            } else {
                is_default = 0
            }

            $.ajax({
                type: "post",
                url: "member/insert_invoice",
                data: {
                    'id': id,
                    'invoice_type': invoice_type,
                    'is_default': is_default,
                    'invoice_company_name': invoice_company_name,
                    'invoice_code': invoice_code,
                    'invoice_address': invoice_address,
                    'invoice_tel': invoice_tel,
                    'invoice_bank': invoice_bank,
                    'invoice_account': invoice_account
                },
                dataType: "json",
                success: function (data) {
                    // console.log(data);
                    if (data['code'] == 0) {
                        setTimeout(function () {
                            window.location.reload();
                        }, 2000);
                        layer.msg(data.msg);
                    } else {
                        layer.msg(data.msg);
                    }
                }
            })
        });


    </script>

    <script type="text/javascript">


        $('.set-default').click(function () {
            var id = $(this).attr('id');
            console.log(id);
            $.ajax({
                type: "post",
                url: "member/invoice_default",
                data: {'id': id},
                dataType: "json",
                success: function (data) {
                    if (data.code == 0) {
                        setTimeout(function () {
                            window.location.reload();
                        }, 2000);
                        layer.msg(data.msg);
                    } else {
                        layer.msg(data.msg);
                    }
                }
            })
        });

        $('.deletects').click(function () {
            var id = $(this).attr('id');
            console.log(id);
            $.ajax({
                type: "post",
                url: "member/invoice_del",
                data: {'id': id},
                dataType: "json",
                success: function (data) {
                    if (data.code == 0) {
                        setTimeout(function () {
                            window.location.reload();
                        }, 2000);
                        layer.msg(data.msg);
                    } else {
                        layer.msg(data.msg);
                    }
                }
            })
        });

        function editAddress(obj) {
            jQuery('html,body').animate({
                scrollTop: jQuery(".my-center-right-form").offset().top - 50
            }, 300);

            var t = obj, tr = t.parents(".my-center-right-invoice-item");
            var name = tr.find(".name").text(),
                invoice_code = tr.find(".invoice_code").val(),
                invoice_type = tr.find(".invoice_type").val(),
                invoice_address = tr.find(".invoice_address").val(),
                invoice_bank = tr.find(".invoice_bank").val(),
                invoice_account = tr.find(".invoice_account").val(),
                invoice_tel = tr.find(".invoice_tel").val();
            // console.log(invoice_type);
            var isDefault = tr.find('.default_address').attr('gdata-value');
            $('#invoice_company_name').val(name);
            $('#invoice_code').val(invoice_code);
            $('#invoice_address').val(invoice_address);
            $('#invoice_bank').val(invoice_bank);
            $('#invoice_tel').val(invoice_tel);
            $('#invoice_account').val(invoice_account);
            $('#addr_id').val(obj.attr('id'));
            if (isDefault == 1) {
                $('#is_default').attr('checked', 1);
            } else {
                $('#is_default').attr('checked', 0);
            }

            // $('.radio-box div').removeClass('layui-form-radioed');
            if (invoice_type != 4) {
                $("#dwmc_div").show();
                $("#nsrsbm_div").show();
                $("#zcdz_div").show();
                $("#zcdh_div").show();
                $("#khyh_div").show();
                $("#yhzh_div").show();
                $('#zzs_id').prop('checked', true);
                $('#zzspt_id').prop('checked', false);
                console.log(2);
                // $('.radio-box div').first().addClass('layui-form-radioed');

                $('#zzspt_id').prop('checked', false);
                $('#zzs_id').prop('checked', true);

                layui.use(['element', 'form', 'layedit', 'laydate', 'upload'], function () {
                    var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
                    var form = layui.form
                        , layer = layui.layer
                        , layedit = layui.layedit;
                    var $ = layui.jquery
                        , upload = layui.upload;
                    form.render('radio');
                    $('#zzs_id').next().click(function () {
                        $("#dwmc_div").show();
                        $("#dwmc_div #invoice_company_name").val("");
                        $("#nsrsbm_div").show();
                        $("#nsrsbm_div #invoice_code").val("");
                        $("#zcdz_div").show();
                        $("#zcdh_div").show();
                        $("#khyh_div").show();
                        $("#yhzh_div").show();
                    });

                    $('#zzspt_id').next().click(function () {
                        $("#dwmc_div").show();
                        $("#dwmc_div #invoice_company_name").val("");
                        $("#nsrsbm_div").show();
                        $("#nsrsbm_div #invoice_code").val("");
                        $("#zcdz_div").hide();
                        $("#zcdz_div #invoice_address").val("");
                        $("#zcdh_div").hide();
                        $("#zcdh_div #invoice_tel").val("");
                        $("#khyh_div").hide();
                        $("#khyh_div #invoice_bank").val("");
                        $("#yhzh_div").hide();
                        $("#yhzh_div #invoice_account").val("");
                    });
                });

            } else {

                // console.log(4);
                // $('.radio-box div').addClass('layui-form-radioed');
                // $('.radio-box div').last().addClass('layui-form-radioed');

                $('#zzs_id').prop('checked', false);
                $('#zzspt_id').prop('checked', true);

                layui.use(['element', 'form', 'layedit', 'laydate', 'upload'], function () {
                    var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
                    var form = layui.form
                        , layer = layui.layer
                        , layedit = layui.layedit;
                    var $ = layui.jquery
                        , upload = layui.upload;
                    form.render('radio');
                    $('#zzs_id').next().click(function () {
                        $("#dwmc_div").show();
                        $("#dwmc_div #invoice_company_name").val("");
                        $("#nsrsbm_div").show();
                        $("#nsrsbm_div #invoice_code").val("");
                        $("#zcdz_div").show();
                        $("#zcdh_div").show();
                        $("#khyh_div").show();
                        $("#yhzh_div").show();
                    });

                    $('#zzspt_id').next().click(function () {
                        $("#dwmc_div").show();
                        $("#dwmc_div #invoice_company_name").val("");
                        $("#nsrsbm_div").show();
                        $("#nsrsbm_div #invoice_code").val("");
                        $("#zcdz_div").hide();
                        $("#zcdz_div #invoice_address").val("");
                        $("#zcdh_div").hide();
                        $("#zcdh_div #invoice_tel").val("");
                        $("#khyh_div").hide();
                        $("#khyh_div #invoice_bank").val("");
                        $("#yhzh_div").hide();
                        $("#yhzh_div #invoice_account").val("");
                    });
                });


                //     $('#zzs_id').removeAttr('checked');
                // $('.radio-box div').first().removeClass('layui-form-radioed');
                $("#dwmc_div").show();
                $("#nsrsbm_div").show();
                $("#zcdz_div").hide();
                $("#zcdz_div #invoice_address").val("");
                $("#zcdh_div").hide();
                $("#zcdh_div #invoice_tel").val("");
                $("#khyh_div").hide();
                $("#khyh_div #invoice_bank").val("");
                $("#yhzh_div").hide();
                $("#yhzh_div #invoice_account").val("");
            }


        }
    </script>
</body>
</html>
